package cn.com.surker.production.service.impl;

import cn.com.surker.production.dao.InvoiceExamineDao;
import cn.com.surker.production.entity.vo.InvoiceExamineVo;
import cn.com.surker.production.service.InvoiceExamineService;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 生产发货单审核记录表 服务实现类
 * </p>
 *
 * @author admin
 * @since 2025-02-12
 */
public abstract class BaseInvoiceExamineImpl implements InvoiceExamineService {

	@Resource
	protected InvoiceExamineDao invoiceExamineDao;

	@Override
	public List<InvoiceExamineVo> findList(String erpDb, Long invoiceId, Integer examineType, Integer examineStatus) {
		if (erpDb == null || invoiceId == null) {
			return null;
		}
		List<InvoiceExamineVo> list = invoiceExamineDao.findList(erpDb, invoiceId, examineType, examineStatus);
		return list;
	}

	@Override
	public Map<String, Object> selectExamineNum(String erpDb, String startTime, String endTime, Long indentId) {
		Map<String, Object> data = invoiceExamineDao.selectExamineNum(erpDb, startTime, endTime, indentId);
		if (data == null) {
			data = new HashMap<>();
			data.put("saleCount", 0);
			data.put("proCount", 0);
			data.put("totalCount", 0);
		}
		return data;
	}


}